package edu.spec.dengyan.week09.class02.homework;

/**
 * Author       : Dengyan
 * Date         : 2018/10/11 23:19
 * Description  : “Food”类
 */
public class Food {
    //成员属性1，姓名，name，String类型，访问类型为private
    //成员属性2，价格，price，int类型,访问类型为private
    private String name;
    private int price;
//构造方法：自行设计
    public Food() {
    }

    public Food(String name, int price) {
        this.name = name;
        this.price = price;
    }
//成员方法：成员属性对应的setter和getter
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
}
